package games;

public class MoneyCard extends Cards {
	double money;
	
	public MoneyCard(int m)
	{
		money=m;
	}
	
	public void onPick(Player p)
	{
		if(money>=0)
		{
			p.earnMoney(money);
			System.out.println(p.getPlayerName() + " : earned : " + money);
		}
		else
		{
			p.loseMoney(money*(-1));
			System.out.println(p.getPlayerName() + " : losed : " + money);
		}
	}
}
